package com.micangcaihang.micang.mvp.task.contract;

import com.micangcaihang.common.base.mvp.BaseModel;
import com.micangcaihang.common.base.mvp.BasePresenter;
import com.micangcaihang.common.base.mvp.IBaseView;
import com.micangcaihang.common.http.ApiResult;
import com.micangcaihang.micang.entity.FileListEntity;
import com.micangcaihang.micang.entity.TaskAccessoryInfoEntity;
import com.micangcaihang.micang.http.request.TaskAccessoryInfoRequest;

import java.util.List;

import io.reactivex.Observable;

/**
 * <pre>
 *     author : Fandy
 *     e-mail : fandayongfly@gmail.com
 *     time   : 2017/07/30
 *     update : 2017/07/30
 *     desc   : 风控-其他人员附件
 *     version: 1.0
 * </pre>
 */

public interface FTaskOtherPeopleAccessoryContract {
    interface View extends IBaseView {
        /**
         * 返回附件信息1信息
         *
         * @param entity
         */
        void returnAccessoryInfoData(List<TaskAccessoryInfoEntity> entity);
    }

    interface Model extends BaseModel {
        /**
         * 获取附件信息1数据
         *
         * @return
         */
        Observable<ApiResult<FileListEntity>> getAccessoryInfoData(String id, String type);

        /**
         * 保存信息
         *
         * @return
         */
        Observable<ApiResult<Void>> savaAccessoryInfoData(TaskAccessoryInfoRequest request);
    }

    abstract class Presenter extends BasePresenter<View> {
        /**
         * 加载房屋配套数据
         */
        public abstract void loadAccessoryInfoData();

        /**
         * 保存信息
         *
         * @param request
         */
        public abstract void saveAccessoryInfoData(TaskAccessoryInfoRequest request);
    }
}
